<?php  
	function delete_tag($tag){
		$delete = "DELETE FROM tags WHERE tag='".$tag."';";
		$result = mysql_query($delete);	
		$delete = "DELETE FROM UserTags WHERE tag='".$tag."';";
		$result = mysql_query($delete);	
		$delete = "DELETE FROM TagAttributes WHERE tag='$tag' AND type='usr'";
		$result = mysql_query($delete);
	}
	
	include_once '../manage_db/db_connect.php';
	$con = db_connect();
	$tag = $_GET['link'];
	delete_tag($tag);
	header("Location: ../manage_tags.php");
?>